package com.luoxin.servicemap.service;

import com.luoxin.internalcommon.dto.ResponseResult;
import com.luoxin.internalcommon.response.TerminalResponse;
import com.luoxin.servicemap.remote.TerminalClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TerminalService {
    @Autowired
    private TerminalClient terminalClient;
    /**
     * 创建终端
     * @param name
     * @return
     */
    public ResponseResult<TerminalResponse> add(String name,String desc) {
        return terminalClient.add(name,desc);
    }

    public ResponseResult deleteTerminal(String tid) {
        return terminalClient.deleteTerminal(tid);
    }

    public ResponseResult search() {
        return terminalClient.search();
    }

    public ResponseResult<List<TerminalResponse>> aroundSearch(String center, Integer radius) {
        return terminalClient.aroundSearch(center,radius);
    }
}
